package com.nova.android.tvlauncher.ext

import com.nova.android.tvlauncher.bean.HomeInfoDto

fun HomeInfoDto.addParamsValue(isLocalData:Boolean = false): HomeInfoDto {
    this.isLocal = isLocalData
    this.movies?.forEach {
        //首页，电影，电视节目，应用程序
        it?.subData?.forEachIndexed { index, subData ->
            subData?.datas?.forEach {
                it?.parentPosition = index
                it?.isLocal = isLocalData
            }
        }
        it?.top?.forEach {
            it?.isLocal = isLocalData
        }
    }
    return this
}